<template>
  <div class="vue-scss clearfix">
    <el-scrollbar style="height: 100%">
    <div class="main">
      <el-card class="box-card" shadow="hover">
        <div slot="header" class="clearfix">
          <span class="fs16">依赖包</span>
        </div>
        <div class="fs14 p10 lh20 text-left">
          <code>
            npm install node-sass --save-dev<br>
            npm install sass-loader --save-dev<br>
            npm install --save-dev style-loader css-loader<br>
          </code>
        </div>
      </el-card>
      <el-card class="box-card" shadow="hover">
        <div slot="header" class="clearfix">
          <span class="fs16">webpack.base.config.js修改</span>
        </div>
        <div class="fs14 p10 lh20 text-left">
          <code>
            rules中：<br>
            修改<br>
            {<br>
              &nbsp;&nbsp;test: /\.vue$/,<br>
              &nbsp;&nbsp;loader: 'vue-loader',<br>
              &nbsp;&nbsp;options: {<br>
                &nbsp;&nbsp;&nbsp;&nbsp;loaders: {<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'scss': 'style-loader!css-loader!sass-loader'<br>
                &nbsp;&nbsp;&nbsp;&nbsp;}<br>
              &nbsp;&nbsp;}<br>
            }<br>
            添加：<br>
            {<br>
              &nbsp;&nbsp;test: /\.scss$/,<br>
              &nbsp;&nbsp;loaders: ["style", "css", "sass"]<br>
            }
          </code>
        </div>
      </el-card>
      <el-card class="box-card" shadow="hover">
        <div slot="header" class="clearfix">
          <span class="fs16">使用</span>
        </div>
        <div class="fs14 p10 lh20 text-left">
          <code>
            &lt;style src=“” lang="scss" scoped&gt;&lt;/style&gt;
          </code>
        </div>
      </el-card>
    </div>
    </el-scrollbar>
  </div>
</template>

<script>
export default {
  name: 'VueScss'
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.vue-scss{
  margin: 0 auto;
  overflow: hidden;
  .main{
    column-count: 2;
    column-gap:10px;
    padding: 10px;
  }
  .el-card{
    margin: 10px 0;
  }
  .el-card__header{
    padding: 0 10px;
    text-align: left;
    font-size: 14px;
    line-height: 30px;
    line-height: 30px;
  }
}
</style>
